package ar.edu.unlp.info.dssd.acciones;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.interceptor.ApplicationAware;
import org.apache.struts2.interceptor.ServletRequestAware;
import org.apache.struts2.interceptor.SessionAware;

import com.opensymphony.xwork2.ActionSupport;

public abstract class AbstractAccion extends ActionSupport implements SessionAware, ApplicationAware, ServletRequestAware {

	private static final long serialVersionUID = 2178998746537377787L;

	private HttpServletRequest request;
	
	public void setServletRequest(HttpServletRequest request) {
		this.request = request;		
	}

	public HttpServletRequest getRequest() {
		return request;
	}
	private Map<String, Object> session;

	@SuppressWarnings("unchecked")
	public void setSession(Map value) {
		this.session = value;
	}

	/**
	 * <p>
	 * Provide session context.
	 * </p>
	 * 
	 * @return session context
	 */
	public Map<String, Object> getSession() {
		return this.session;
	}
	private Map<String, Object> application;

	/**
	 * <p>
	 * Store a new application context.
	 * </p>
	 * 
	 * @param value
	 *            A Map representing application state
	 */
	@SuppressWarnings("unchecked")
	public void setApplication(Map value) {
		this.application = value;
	}

	/**
	 * <p>
	 * Provide application context.
	 * </p>
	 */
	public Map<String, Object> getApplication() {
		return this.application;
	}
	
	}
